home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dirut
/
rm_om.zip
/
RM.MAN
< prev
next >
Wrap
Text File
|
1991-10-16
|
3KB
|
73 lines
rm MS-DOS programmers manual rm
rm [//afir] [filename] [-] {...}
Removes files, directories or recursively directory structures given as
argument. If the a option argument contains a second option separator
(by default '/'), all the following arguments are interpreted as file
names, even if they have a leading '/'.
If the argument "-" is given, stdin is read at that point to get filenames
to be removed. Generally this is not needed, because the last argument is
always assumed to be "-" if stdin is not a tty. Option settings cannot be
read from stdin.
If the environment variable RMFLAGS is set, it is first parsed as initial
options for rm. If, for example, you feel that all file deletes should
be inquired, do:
SET RMFLAGS=I
Note that if this variable contains the option separator character, no
options can be specified on the command line. The setting:
SET RMFLAGS=/FA
Will prevent options being set on the command line and force F and A modes
permanently on.
Please note that by changing SWITCHAR in the config.sys file, the option
separator character (default '/') may be changed. This program will also
react to this change, in spite of command.com not changing it's workings
(on DOS 3.10 and higher).
There are some problems with using SWITCHAR (not the least being that in
DOS5 it's been totally removed), so another solution is to set the first
character of the environment variable SWITCHAR to the value you wish.
For example, to achieve more Unix-likeness:
SET SWITCHAR=-
Options:
a all files/directories are rm'd, also readonly/hidden/system. If
this argument is not specified, these files are ignored and dir's
containing these files will not be removed. If f option is not
specified with this, rm will be asked for each file.
f force, don't display error messages even if errors are detected.
Also don't ask when removing readonly/hidden/system files/dirs.
i inquire yes/no/all/quit for each file.
q quiet mode, don't display file names as they are removed.
r recursive rm. The argument(s) must be non-wildcard(s) specifying
the directory system to remove.
Diagnostics:
usage: rm [//afir] {filename}...
Usage information, given if no valid file arguments
unknown option %s in env. variable RMFLAGS
Options given in environment variable RMFLAGS were not valid
unknown option %s
Option given was not valid (also the usage message is given)
no match for %s
The wildcard pattern shown did not match anything
rm %s ?
The program is asking for confirmation remove the shown item;
press Y to remove, N not to and Q to quit
rm: %s
The program confirms that the shown item was removed
override mode %02x for %s ?
The shown item was readonly/system/hidden, and the program asks
for confirmation if to delete the file
cannot chmod "%s" from %02x (status %d)
cannot rmdir "%s" (status %d)
cannot remove "%s" (status %d)
The specified operation could not be performed, see MS-DOS manual
for explanation of status codes
(c) 1988,1989,1990,1991 by Otto Makela, Jyvaskyla, Finland
Distributed under the GNU General Licence -- see file COPYING for details
Call JyBox +358 41 211 562, V.22bis/V.22/V.21, 24h/day